<?php
/**
 * @version SVN: $Id: view.html.php 1174 2010-04-26 14:51:33Z elkuku $
 * @package    EasyCreator
 * @subpackage Views
 * @author     EasyJoomla {@link http://www.easy-joomla.org Easy-Joomla.org}
 * @author     Nikolai Plath {@link http://www.nik-it.de}
 * @author     Created on 03-Mar-08
 * @license    GNU/GPL, see JROOT/LICENSE.php
 */

//-- No direct access
defined('_JEXEC') or die('=;)');

jimport('joomla.application.component.view');

/**
 * HTML View class for the EasyCreator Component
 *
 * @package EasyCreator
 * @subpackage Views
 */
class EasyCreatorViewConfig extends JView
{
    public function display($tpl = null)
    {
        switch(ECR_JVERSION)
        {
        	case '1.5':
                $table = JTable::getInstance('component');
                $table->loadByOption('com_easycreator');
        	break;
        	case '1.6':
        	    $component = JComponentHelper::getComponent('com_easycreator');
                $table = JTable::getInstance('extension');
                $table->load($component->id);
        	break;

        	default:
        		JError::raiseWarning(100, JText::_('Unsupported Joomla version in EasyCreatorViewConfig->display'));

        		ecrHTML::easyFormEnd();
        		return;
        	break;
        }//switch

        $this->parameters = new JParameter($table->params, JPATH_COMPONENT.DS.'config.xml');

        parent::display($tpl);

        ecrHTML::easyFormEnd();
    }// function

}// class
